<template>
    <view class="container">
        <view>
            <desc-wrapper :title="title" :desc="desc"></desc-wrapper>
            <view class="card-wrapper">
                <view class="dividing_line">
                    <view class="enhance-text"></view>
                    <view class="card-content-item" v-for="(item, idx) in resp" :key="idx">
                        <view class="desc-text flex-row justify-between">
                            <text>年:</text>
                            <text class="score-text">{{ item.year }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>月:</text>
                            <text class="score-text">{{ item.month }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>日:</text>
                            <text class="score-text">{{ item.day }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>时:</text>
                            <text class="score-text">{{ item.hour }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>分:</text>
                            <text class="score-text">{{ item.minute }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>秒:</text>
                            <text class="score-text">{{ item.second }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>星座:</text>
                            <text class="score-text">{{ item.xingzuo }}</text>
                        </view>
                        <view class="desc-text flex-row justify-between">
                            <text>星期:</text>
                            <text class="score-text">{{ item.xingqi }}</text>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            title: '八字反查',
            desc: '本次测算结果仅供娱乐使用，请勿用于封建迷信和违法用途。',
            resp: null
        }
    },

    onLoad(opt) {
        this.resp = JSON.parse(opt.params) //JSON字符串转换成JSON
    }
}
</script>
<style lang="scss"></style>
